package com.jn.erp.web.api.course.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jn.erp.web.api.course.entity.TCourseOrder;
import com.jn.erp.web.api.course.entity.dto.*;
import com.jn.erp.web.api.course.entity.vo.DataTrendsVo;
import com.jn.erp.web.api.course.entity.vo.TCourseOrderVo;
import com.jn.erp.web.api.interaction.entity.vo.TEvaluateVo;
import com.jn.erp.web.api.student.entity.dto.EnrollmentStuDto;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author wyp
 * @since 2024-09-04
 */
public interface TCourseOrderMapper extends BaseMapper<TCourseOrder> {
    public TCourseOrder lastCourseOrder(@Param("startTime") LocalDateTime startTime,@Param("cofId") Long cofId,@Param("studentId") Long studentId);

    List<TCourseOrderDto> courseOrderList(TCourseOrderVo tCourseOrderVo);

    List<StudentOrderListExcalDto> exportOrderList(TCourseOrderVo tCourseOrderVo);

    TCourseOrderDto getCourseOrderById(TCourseOrderVo tCourseOrderVo);

    List<TCourseOrderDto> orderStudentList(TCourseOrderVo tCourseOrderVo);

    List<TCourseOrderDto> orderListSecond(TCourseOrderVo tCourseOrderVo);

    List<StudentOrderListExcal2CDto> exportOrderListSecondC(TCourseOrderVo tCourseOrderVo);

    List<StudentOrderListExcal2SDto> exportOrderListSecondS(TCourseOrderVo tCourseOrderVo);

    List<TCourseOrderDto> evaluateStudentList(TEvaluateVo tEvaluateVo);

    List<TCourseOrderDto> repairDetail(TCourseOrderVo tCourseOrderVo);

    List<TCourseOrderDto> orderListThird(TCourseOrderVo tCourseOrderVo);

    TCourseOrderDto orderDetailSecond(TCourseOrderVo tCourseOrderVo);

    Map orderCountSecond(TCourseOrderVo tCourseOrderVo);

    int called(@Param("orderNo") String orderNo);

    TCourseOrder selectByStuId(@Param("dto") EnrollmentStuDto dto);

    List<TCourseOrderDto> courseOrderLists(TCourseOrderVo tCourseOrderVo);

    String getMaxOrderNo(@Param("date") String date);

    Integer  selectByCount(@Param("student") EnrollmentStuDto student);

    EnrollmentStuDto countMoney(@Param("student") EnrollmentStuDto student);

    List<TCourseOrderDto> evaluationRecordsList(TEvaluateVo tEvaluateVo);

    Map<String,BigDecimal> count( @Param("tCourseOrderVo") DataTrendsVo dataTrendsVo , @Param("startDate") String startDate, @Param("endDate") String endDate);
    Map<String,Long> countP( @Param("tCourseOrderVo") DataTrendsVo dataTrendsVo , @Param("startDate") String startDate, @Param("endDate") String endDate);
    Map<String, BigDecimal> courseConsumption(@Param("tCourseOrderVo") DataTrendsVo dataTrendsVo, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("str") String str);

    Map<String,Long> countStudentStudying( @Param("dataTrendsVo") DataTrendsVo dataTrendsVo , @Param("str") String str,@Param("dateValue") String dateValue);

    List<DataTrendsDto> dataTrends(DataTrendsVo dataTrendsVo) ;

    List<DataTrendsDto> dataTrendsMonth(DataTrendsVo dataTrendsVo) ;

    List<DataTrendsDto> dataTrendsTeacher(DataTrendsVo dataTrendsVo);

    List<DataTrendsDto> dataTrendsClass(DataTrendsVo dataTrendsVo);

    List<DataTrendsDto> dataTrendCourse(DataTrendsVo dataTrendsVo) ;

    List<DataTrendsDto> dataTrendStudent(DataTrendsVo dataTrendsVo) ;

    List<TCourseOrderDto> evaluateTeacherList(TEvaluateVo evaluateTeacherList);

    //根据当前员工用户获取超时未点课次总数
    Long getUserIdIncompleteCount(TCourseOrderVo tCourseOrderVo);

}
